package cn.cocho.android.mc.comp.image;

import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;

import cn.cocho.android.mc.R;
import cn.cocho.android.mc.comp.image.gifview.GifView;

public class GifImageView extends GifView {

	private int gifImage;

	public GifImageView(Context context, AttributeSet attrs) {
		super(context, attrs);
		TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.GifImageView);
		this.gifImage = typedArray.getResourceId(R.styleable.GifImageView_imageView_gif, 0);
		typedArray.recycle();
		if (gifImage > 0) {
			setGifImage(gifImage);
		}
	}

	public int getGifImage() {
		return gifImage;
	}

	public void setGifImage(int gifImage) {
		this.gifImage = gifImage;
		super.setGifImage(gifImage);
	}

}
